import request from "@/utils/request";
const BASE_URL = "/well/structure";

/**
 * @deprecated 查询井结构列表
 * @param {*} query
 * @returns
 */

// 井结构中套管列表新增
export function createCasing(data) {
  return request({
    url: BASE_URL + "/casing",
    method: "post",
    data: data,
  });
}
// 查询井结构中套管列表
export function casingList(id) {
  return request({
    url: BASE_URL + "/casings",
    method: "get",
    params: {
      wellId: id,
    },
  });
}
// 井结构中套管删除
export function delCasing(id) {
  return request({
    url: BASE_URL + "/casing" + "/" + id,
    method: "delete",
  });
}

// 井结构中电缆列表新增
export function createCables(data) {
  return request({
    url: BASE_URL + "/cables",
    method: "post",
    data: data,
  });
}
// 查询井结构中电缆列表
export function cablesList(id) {
  return request({
    url: BASE_URL + "/cables",
    method: "get",
    params: {
      wellId: id,
    },
  });
}
// 井结构中电缆删除
export function delCables(id) {
  return request({
    url: BASE_URL + "/cables" + "/" + id,
    method: "delete",
  });
}

// 井结构中油管列表新增
export function createTubing(data) {
  return request({
    url: BASE_URL + "/tubing",
    method: "post",
    data: data,
  });
}
// 查询井结构中油管列表
export function tubingsList(id) {
  return request({
    url: BASE_URL + "/tubings",
    method: "get",
    params: {
      wellId: id,
    },
  });
}
// 井结构中油管删除
export function delTubing(id) {
  return request({
    url: BASE_URL + "/tubing" + "/" + id,
    method: "delete",
  });
}

// 井结构中钻杆列表新增
export function createDrillpipe(data) {
  return request({
    url: BASE_URL + "/drillpipe",
    method: "post",
    data: data,
  });
}
// 查询井结构中钻杆列表
export function drillpipesList(id) {
  return request({
    url: BASE_URL + "/drillpipes",
    method: "get",
    params: {
      wellId: id,
    },
  });
}
// 井结构中钻杆删除
export function delDrillpipe(id) {
  return request({
    url: BASE_URL + "/drillpipe" + "/" + id,
    method: "delete",
  });
}
